/*
 * 
 * author     date                    function                 purpose
 * wuwentao   20111122             base structure            add base structure of toolsScreen*/

package com.badlogicgames.framwork;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL10;
import com.badlogic.gdx.graphics.GLCommon;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.math.Rectangle;
import com.badlogic.gdx.math.Vector3;
import com.badlogicgames.oceanballwar.Assets;

public class ToolsScreen extends Screen {
	OrthographicCamera guiCam;
	SpriteBatch batcher;

	public ToolsScreen (Game game) {
		super(game);

		guiCam = new OrthographicCamera(1024, 768);
		guiCam.position.set(1024 / 2, 768 / 2, 0);
		
		batcher = new SpriteBatch();	
	}

	@Override
	public void update (float deltaTime) {//please add logic event handle here

	}

	@Override
	public void present (float deltaTime) {//please add rendering code here
		GLCommon gl = Gdx.gl;
		gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
		guiCam.update();
		guiCam.apply(Gdx.gl10);

		gl.glEnable(GL10.GL_TEXTURE_2D);

		batcher.disableBlending();
		batcher.begin();
		batcher.draw(Assets.backgroundRegion, 0, 0, 320, 480);
		batcher.end();

		batcher.enableBlending();
		batcher.begin();
		batcher.draw(Assets.toolScreenRegion, 0, 0, 1024, 768);

		batcher.end();
	}

	@Override
	public void resume () {
	}

	@Override
	public void pause () {
	}

	@Override
	public void dispose () {
	}
}
